home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20010306-20010921
/
000274_fdc@watsun.cc.columbia.edu_Sat Jul 14 12:26:58 EDT 2001.msg
< prev
next >
Wrap
Text File
|
2001-09-20
|
4KB
|
87 lines
Article: 12605 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!watsun.cc.columbia.edu!fdc
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Newsgroups: comp.os.vxworks,comp.arch.embedded,comp.protocols.kermit.misc
Subject: Re: Kermit for VxWorks
Date: 14 Jul 2001 16:26:45 GMT
Organization: Columbia University
Lines: 70
Message-ID: <9iprs5$49g$1@newsmaster.cc.columbia.edu>
References: <9ikjrq$asm@watsun.cc.columbia.edu> <3B506CAD.D85AC443@covad.net>
NNTP-Posting-Host: watsun.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 995128005 4400 128.59.39.2 (14 Jul 2001 16:26:45 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 14 Jul 2001 16:26:45 GMT
Xref: newsmaster.cc.columbia.edu comp.os.vxworks:41704 comp.arch.embedded:108407 comp.protocols.kermit.misc:12605
In article <3B506CAD.D85AC443@covad.net>, <drdiags@covad.net> wrote:
: Some points I have noticed during the porting of gkermit. There
: are several functions and structures which I probably would declare
: static, such as lkup() in the gwart.c file. vxWorks has a similar
: function. So I am going through all the source and leaving global
: those functions that make sense for me. I may not complete this in
: a timely manner, so hopefully someone else has already moved further
: along than I.
:
Yes, at least one other person is working this. If anybody else is
working on it too, please get in touch with me so I can coordinate.
Obviously I underestimated the differences between VxWorks and other
UNIXlike RTOSs like QNX and OS-9. It appears that traditionally
structured C programs like G-Kermit (and C-Kermit) are not a good fit
to the VxWorks model. G-Kermit was not designed for embedding.
Since my original posting I have learned that:
. Software for VxWorks is cross-built on other platforms,
such as Sun.
. One doesn't have programs in VxWorks, one has functions.
Thus there can be no main().
. When a function is invoked from the VxWorks shell,
command-line arguments are mapped to function arguments.
Thus the handling of argc/argv must be reworked.
. All memory is global, there is no separate address space for
different tasks (thus the need to be careful with global
variables and buffers).
. VxWorks public functions are object files, not executables;
they are linked when loaded.
Another guy who tried building G-Kermit on VxWorks got clean compiles
for all modules except gunixio.c, where the following functions had
errors. Here is what those functions should do:
. sysinit() gets and saves the console terminal modes (if such a
concept even exists on VxWorks) and then sets the console terminal
to ignore keyboard interrupts. If VxWorks does not support console
terminal keyboard interrupts then sysinit() has nothing to do.
. ttpkt() sets the console terminal modes (if necessary) to allow
Kermit to read a stream of bytes literally, without the console
driver getting in the way. It also needs to enable some form of
flow control, if VxWorks supports such a thing, such as RTS/CTS or
Xon/Xoff. It also instructs the OS not to echo incoming
characters.
. ttflui() reads and discards any characters that have arrived and
are sitting in the console buffer, but have not yet been read by
Kermit. It must not block.
. ttinl() reads a Kermit packet with a given timeout -- that is, if
the packet does not arrive within "timo" seconds, it's supposed to
give up and return -1. In UNIX this is done with alarm() and
signal(), which apparently don't exist in VxWorks?
Also, note that gwart.c and gproto.w can probably be ignored. gproto.w
is the Kermit protocol state table interpreter, written in a Lex-like
language called "wart". gwart.c is compiled and saved as "wart", and
then gproto.w is run through wart to produce gproto.c. But gproto.c is
already included. You don't need to mess with wart and gproto.w unless
you are changing the protocol module. In any case, the wart program is
run only on the development system, not on VxWorks.
- Frank